package cn.xiangxiang.mapper.goods;

import cn.xiangxiang.pojo.goods.Spec;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface SpecMapper extends BaseMapper<Spec> {

    @Select("select name ,`options` from tb_spec where template_id in  " +
            "( " +
            " select  template_id from tb_category where name =  #{categoryName} " +
            ")")
    List<Map> findListByCategoryName(@Param("categoryName") String categoryName);
}
